# -*- coding = utf-8 -*-
# @Time      : 2020/10/17 19:35
# @Author    : Reanon
# @File      : main.py
# @Email     : dafo360@gmail.com
# @Software  : PyCharm

from util.getData import getData
from util.saveData import saveData

if __name__ == '__main__':
    #  网址：All Published SPECpower_ssj2008 Results
    baseurl = "http://spec.org/power_ssj2008/results/power_ssj2008.html"
    # 存取数据
    savapath = "./data/SPECPower_ssj2008_Results.xls"

    # 1.1 爬取网页
    # html = askURL(baseurl)
    # 1.2 读取本地网页
    # html_local = open("./data/All Published SPEC SPECpower_ssj2008 Results.html", "rb")
    # soup = BeautifulSoup(html_local, "html.parser")

    # 2.解析网页
    datalist = getData(baseurl)
    # 3.保持数据
    saveData(datalist, savapath)
